package com.jason.kotlin.gank.ui.adapter.binder

import com.chad.library.adapter.base.binder.QuickItemBinder
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.jason.kotlin.gank.R
import com.jason.kotlin.gank.model.RollDayBean

/**
 * @description: 老黄历
 *
 * @author ChenBaoyang
 * @date 4/27/21 16:51
 */
class WeatherCalendarItemBinder : QuickItemBinder<RollDayBean>() {
    override fun convert(holder: BaseViewHolder, data: RollDayBean) {
        data.run {
            holder.setText(R.id.tv_01, date)
            holder.setText(R.id.tv_06, typeDes)
            holder.setText(R.id.tv_02, lunarCalendar)
            holder.setText(R.id.tv_03, "$yearTips ( $chineseZodiac )  - $solarTerms")
            holder.setText(R.id.tv_04, suit)
            holder.setText(R.id.tv_05, avoid)
        }
    }

    override fun getLayoutId() = R.layout.item_weather_calendar
}